package com.orgname.glvone.glvtwo.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;

@Data
@TableName("user")
public class User {

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @NotEmpty(message = "30001#用户名不能为空")
    @Length(min = 6, max = 32, message = "用户名必须大于6位并且小于32位")
    private String name;

    @NotEmpty(message = "密码不能为空")
    @Length(min = 6, max = 32, message = "密码必须大于6位并且小于32位")
    private String password;

    @NotEmpty(message = "昵称不能为空")
    private String nickname;
}
